classdef DataMatrix < BatHandle
    properties ( SetAccess = protected )
        mat = [] % Matrix part for the @DataMatrix object in double form
        zRowName = {} % Row names for the @DataMatrix object
        zColName = {} % Column names for the @DataMatrix object
    end
    
    properties ( SetAccess = protected, Dependent = true )
        nRow % Number of rows
        nCol % Number of columns
    end
    
    methods % Constructor
        function [ this ] = DataMatrix( name, mat, zRowName, zColName )
            if nargin == 0
                this.setName('dm');
            end
            if nargin >= 1
                this.setName(name);
            end
            if nargin >= 2 && nargin ~= 4
                this.setMat(mat);
            end
            if nargin == 3
                error(['BatErr: Invalid `nargin`. ', ...
                    'I.e., `zColName` not to be assigned.']);
            end
            if nargin >= 4
                this.setName(name);
                this.setMat(mat, zRowName, zColName);
            end
        end
    end
    
    methods % Gets (dependent)
        function [ nRow ] = get.nRow( this )
            nRow = size(this.mat, 1);
        end
        
        function [ nCol ] = get.nCol( this )
            nCol = size(this.mat, 2);
        end
    end
    
    methods % Gets
    end
    
    methods % Sets
    end
    
    methods % Misc
    end
end
